# $Id: PKGBUILD 86752 2013-03-21 21:51:06Z eric $
# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
# Contributor: Geoffroy Carrier <geoffory.carrier@koon.fr>
# Contributor: Benjamin Andresen <bandresen AT gmail DOT com>
# Contributor: Kristaps Esterlins <esterlinsh@gmail.com>
# Contributor: Byron Clark <byron@theclarkfamily.name>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>

pkgname=clive
pkgver=2.3.3
pkgrel=2
pkgdesc='Video extraction/download tool for youtube and other websites.'
arch=('any')
url='http://clive.sourceforge.net/'
license=('GPL')
depends=('curl' 'perl-json-xs' 'perl-getopt-argvfile' 'quvi')
backup=('etc/clive/config')
source=("http://downloads.sourceforge.net/project/clive/${pkgver:0:3}/clive-${pkgver}.tar.gz")
md5sums=('16e374fe736b95eb93b963ea38b2e4a9')

build() {
  cd "${pkgname}-${pkgver}"

  perl Makefile.PL INSTALLDIRS=vendor
  make
}

package() {
  cd "${pkgname}-${pkgver}"

  make INSTALLVENDORSCRIPT=/usr/bin DESTDIR="$pkgdir" install

  install -Dm0644 examples/cliverc "${pkgdir}/etc/clive/config"
}
